package com.xuecheng.content.service;

import com.xuecheng.content.entity.CoursePub;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 课程发布 服务类
 * </p>
 *
 * @author 杨佳畅
 * @since 2022-03-28
 */
public interface CoursePubService extends IService<CoursePub> {

    /**
     * 课程预览
     *
     * @param courseBaseId 课程ID
     * @param companyId    机构ID
     * @return
     */
    Map<String, Object> previewCourse(Long courseBaseId, Long companyId);

    /**
     * 课程发布
     *
     * @param courseId  课程ID
     * @param companyId 机构ID
     * @param isResend  是否重新发送
     */
    void publish(Long courseId, Long companyId, boolean isResend);

}
